// TOWN DIALOGUE SCRIPT
//    Town 5: Bowler

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

short choice;

// *** Helen ***
begintalknode 1;
	state = -1;
	personality = 510;
	nextstate = 2;
	condition = 1;
	question = "Helen";
	text1 = "A pretty woman is busy baking delicious smelling bread behind the counter.";
	text2 = "She looks up as you approach _Hi, I'm Helen, can I interest you in some baked goods?_";
	text5 = "Helen puts down the bowl she's mixing and smiles at you.";
	text6 = "_Do you wish to purchase some baked goods?_ she asks.";
	action = INTRO;

begintalknode 2;
	state = 2;
	personality = 510;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Helen replies _I run the bakery here in Bowler where I create many different items._";
	text2 = "_I'm supplied by the surrounding farms so I also have some fresh grown produce._ she adds.";

begintalknode 3;
	state = 2;
	personality = 510;
	nextstate = -1;
	condition = 1;
	question = "What do you know of the she-devil.";
	text1 = "Helen looks puzzled _Who is the she-devil?_";
	text2 = "_I know nothing of the person of whom you speak._";
	text3 = "_We do have bandits around here that Jock next door would be able to tell you about._";
	text4 = "_We had a bandit problem, but no more thanks to you._ Helen says.";
	code =
		if (get_flag(11, 8) == 0)
			remove_string(4);
		else
			remove_string(3);
	break;

begintalknode 4;
	state = 2;
	personality = 510;
	nextstate = -1;
	condition = 1;
	question = "I'd like to see your baked goods.";
	text1 = "You finish looking over Helen's goods.";
	code =
		begin_shop_mode("Bowler Country Bakery", "Helen creates delicious baked goods for sale to a hungry traveler.  Prices are OK.", 14, 2, -1);
	break;

// *** Jock Strap :-) ***
begintalknode 10;
	state = -1;
	personality = 511;
	nextstate = 11;
	condition = 1;
	question = "Jock";
	text1 = "A man looks up as you enter the house.";
	text2 = "He says _Hello strangers, I'm Jock, Jock Strap.  What can I do for you?_";
	text3 = "You giggle involuntarily after hearing his name.  He seems not to notice.";
	text5 = "Jock smiles extending his hand.";
	text6 = "_Hello again._ he says _What can I help you with?_";
	text7 = "You again giggle softly thinking about his full name.";
	text8 = "Jock asks _Have you been able to take care of the bandit problem?_";
	action = INTRO;
	code =
		if ((get_flag(50, 8) == 0) || (get_flag(5, 0) > 0)) {
			remove_string(8);
		}
	break;

begintalknode 11;
	state = 11;
	personality = 511;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Jock answers _I farm some of the fields here around Bowler._";
	text2 = "_I'm usually the one that makes runs into Cresent Valley for supplies we need here._";
	text3 = "_Other than that, I'm really a very boring person._";

begintalknode 12;
	state = 11;
	personality = 511;
	nextstate = 15;
	condition = get_flag(50, 8) == 0;
	question = "What have you heard about the she-devil?";
	text1 = "Jock replies _I don't know much about her other than she seems to prey on those to the east of here._";
	text2 = "_But, I may have something that might help in your she-devil quest, if you can do something for me._";

begintalknode 13;
	state = 11;
	personality = 511;
	nextstate = -1;
	condition = ((get_flag(50, 8) > 0) && (get_flag(11, 8) == 0));
	question = "I haven't completed you quest yet.";
	text1 = "Jock smiles and says _I understand, the bandits are quite tough._";
	text2 = "_Let me know when you have completed the task._ he adds.";
	action = END_TALK;

begintalknode 14;
	state = 11;
	personality = 511;
	nextstate = -1;
	condition = ((get_flag(50, 8) > 0) && (get_flag(11, 8) > 0) && (get_flag(5, 0) == 0));
	question = "I've completed your quest.";
	text1 = "Jock grins _Great. Now I don't have to worry about the bandits when going to Cresent Harbor._";
	text2 = "Jock rummages in his desk and pulls out a doll.";
	text3 = "_Here is the trinket that may help you in your other quest._ Jock says.";
	text4 = "He also hands you a bag of coins.";
	text5 = "_This isn't much, but please accept this also with my thanks._";
	action = END_TALK;
	code =
		set_flag(5, 0, 1);
		change_spec_item(5, 1);
		toggle_quest(4, 0);
		play_sound(39);
		change_coins(100);
		award_party_xp(75, 20);
	break;

begintalknode 15;
	state = 15;
	personality = 511;
	nextstate = 16;
	condition = 1;
	question = "What do you need done.";
	text1 = "Jock answers _Recently bandits have started preying on people travelling out of Cresent Bowl._";
	text2 = "_I myself have been robbed several times getting supplies from Cresent Valley._";
	text3 = "_The empire garrison is too small to be able to protect what they are currently protecting and deal with the bandits._";
	text4 = "Jock asks _Could you take care of the bandit problem?_";
	text5 = "He adds _If you do, I have this doll that was given to me by another traveller that may aid your quest._";
	text6 = "He stops talking while awaiting your answer.";

begintalknode 16;
	state = 16;
	personality = 511;
	nextstate = -1;
	condition = 1;
	question = "Yes, I'll take care of the bandits.";
	text1 = "Jock gives a sigh of relief. _Thank you_ he adds.";
	text2 = "_I believe from what I've experienced and what others have told me_";
	text3 = "_that their hangout is on the north east side of Cresent Bowl._";
	text4 = "_If you can get into there, you may find a way to stop them._";
	text5 = "Jock shakes your hand adding _Please come back when you've taken care of them._";
	action = END_TALK;
	code =
		set_flag(50, 8, 1);
		toggle_quest(4, 1);
	break;

begintalknode 17;
	state = 16;
	personality = 511;
	nextstate = -1;
	condition = 1;
	question = "No, I don't have time for this.";
	text1 = "Jock looks sad _Oh well, I had to ask._";
	text2 = "_Let me know if you change your mind._";
	action = END_TALK;
